<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <link rel="shortcut icon" type="image/x-icon" th:href="@{/img/admin.png}">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>TeamA6 | 商品目录管理</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" th:href="@{/administration/adminlte/bower_components/bootstrap/dist/css/bootstrap.min.css}">
    <!-- Font Awesome -->
    <link rel="stylesheet" th:href="@{/administration/adminlte/bower_components/font-awesome/css/font-awesome.min.css}">
    <!-- Ionicons -->
    <link rel="stylesheet" th:href="@{/administration/adminlte/bower_components/Ionicons/css/ionicons.min.css}">
    <link rel="stylesheet" th:href="@{/administration/bootstrap-table/bootstrap-table.min.css}">
    <!-- Theme style -->
    <link rel="stylesheet" th:href="@{/administration/adminlte/css/AdminLTE.min.css}">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" th:href="@{/administration/adminlte/css/skins/_all-skins.min.css}">

    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>




    <script th:src="@{/administration/adminlte/bower_components/jquery/dist/jquery.min.js}"></script>
    <script th:src="@{/administration/adminlte/bower_components/bootstrap/dist/js/bootstrap.min.js}"></script>
    <!-- FastClick -->
    <script th:src="@{/administration/adminlte/bower_components/fastclick/lib/fastclick.js}"></script>
    <!-- AdminLTE App -->
    <script th:src="@{/administration/adminlte/js/adminlte.min.js}"></script>
    <!-- AdminLTE for demo purposes -->
    <script th:src="@{/administration/adminlte/js/demo.js}"></script>


    <script th:src="@{/administration/bootstrap-table/bootstrap-table.min.js}"></script>
    <script th:src="@{/administration/bootstrap-table/locale/bootstrap-table-zh-CN.js}"></script>
    <![endif]-->

    <!-- Google Font -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <!--    引入公共类头部文件-->
    <div th:replace="administration/common/bar::topbar"></div>
    <!-- 左侧菜单页面-->

    <div th:replace="administration/common/bar::#sidebar"></div>

    <!--不能抽取的内容显示页-->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                网上购物商城
                <small>后台管理</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 主页</a></li>
                <li><a href="#">Sku模块</a></li>
                <li class="active">Sku目录管理</li>
            </ol>
        </section>

        <!-- Main content -->
<!--        <div class="col-md-6 col-md-offset-3">.col-md-6 .col-md-offset-3</div>-->
        <section class="content">
            <div class="row">
                <div class="col-md-6 col-md-offset-3">
                    <h1 id="h1_text" style="color:#3c8dbc;text-align: center">新增商品</h1>
                    <form method="post" action="/adminSku/addSku" enctype="multipart/form-data">

                        <div class="form-group">
                            <label for="exampleInputNameOP" style="color:#3c8dbc" >商品名称：</label>
                            <!--<input type="text"  name="productName" th:if="${product}==null"  class="form-control" id="exampleInputName1" placeholder="商品名称">-->
                            <select name="productId" style="color:#3c8dbc" id="exampleInputNameOP" class="form-control">
                                <option th:text="请输入输入商品的名称"></option>
                                <option th:each="product : ${products}"  th:value="${product.productId}" th:text="${product.productName}">2</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <label for="exampleInputPrice" style="color:#3c8dbc">Color：</label>
                            <input type="text" name="color"  class="form-control" id="exampleInputPrice" placeholder="color">
                        </div>
                        <div class="form-group">
                            <label for="exampleInputDescription" style="color:#3c8dbc">Size：</label>
                            <textarea type="text" name="size" class="form-control" id="exampleInputDescription" placeholder="Size"></textarea>
                        </div>

                        <div class="form-group">
                            <label  style="color:#3c8dbc">图片：</label>
                            <!--<input type="number" name="productYoufei" th:value="${skuEdit}==null?'' : ${skuEdit.imgSrc}" class="form-control" id="exampleInputPostPrice" placeholder="图片路径">-->
                            <input type="file" name="file" >
                        </div>
                        <div class="row">
                            <div  class="col-md-6"><button type="submit" id="submit_btn" class="btn btn-info" style="color:#fff;margin-left: 200px">新增</button></div>
                            <div class="col-md-6"><button type="button"  class="btn btn-info" style="color:#fff;">
                                <a th:href="@{/adminSku/skuList}" style="color: white">取消</a></button></div>
                        </div>
                    </form>
                </div>
            </div>

            <!-- /.row -->
        </section>
        <!-- /.content -->
    </div>

    <!--尾部代码-->
    <div th:replace="administration/common/bar::#footerbar"></div>
    
    <!--控制代码-->
    <!--    <div th:replace="administration/common/bar::#controlbar"></div>-->
</div>
<script>
    $(document).ready(function(){
        if($('#exampleInputEmail1').val() != ''){
            $("#h1_text").text("修改商品")
            $("#submit_btn").text("修改")
        }
    });
    $("#cancel").click(function () {
        window.history.back(-1);
    })
</script>
</body>
</html>
